<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>元素的显示方式</title>
    <style>
        div {
            width: 100px;
            height: 100px;
            border: 1px solid red;
        }
        
        span {
            border: 1px solid blue;
            /*行内元素不能修改宽高*/
            width: 100px;
            height: 100px;
            /*把行内元素改为块级元素或行内块元素都可以修改宽高*/
            display: inline-block;
        }
        img{
            width: 100px;
            height: 100px;
            /*隐藏元素*/
            display: none;
        }
        a{
            display: inline-block;
            width: 132px;
            height: 40px;
            background-color: #0aa1ed;
            font-size: 20px;
            text-align: center;
            line-height: 40px;
            text-decoration: none;
            color: #fff;
            border-radius: 3px;
        }
    </style>
</head>
<body>
<a href="#s1">查看详情</a>
<img src="../2.jpg" alt="">
<img src="../2.jpg" alt="">
<img src="../2.jpg" alt="">
<div>div1</div>
<div>div2</div>
<div>div3</div>
<span>span1</span>
<span>span2</span>
<span id="s1">span3</span>
</body>
</html>